<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <?php

    // $user = $_GET['username'];
    $uid = $_GET['uid'];

    include 'connect.php';

    $sql = "delete from user where id=$uid;";

    $result = mysqli_query($link, $sql);
    if ($result) {
        echo '<script>alert("删除成功");window.location.href = "admin.php";</script>';
    } else {
        echo '<script>alert("删除失败");window.location.href = "admin.php";</script>';
    }

    mysqli_close($link);
    ?>
</body>

</html>